/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package DataAccessLayer;

import java.util.*;

/**
 *
 * @author Yuhan
 */
public class DegreeProgram {
    private String major;
    private String degree;

    // this is a hastable of ArrayList of Strings
    // The key is the area type. Ex: "CORE"
    private Hashtable classesTable = new Hashtable();

    public DegreeProgram(String major, String degree, Hashtable classesTable) {
        this.major = major;
        this.degree = degree;
        this.classesTable = classesTable;
    }
    
    public String getMajor() {return major;}
    public String getDegree() {return degree;}

    /**
     *
     * @param area: valid value for area can be one of the following values:
     *          "CORE", "ELECTIVE", "GE A", "GE B",  "GE C",  "GE D",  "GE E",
     *          "GE F"
     * @return An array of String objects, as the course ID.
     */
    public String[] getClassList(String area) {
        return (String[]) ((ArrayList)classesTable.get(area)).toArray();
    }

}
